/* 获取归属部门字段，如果是多个部门，要用字符串拼接 */
export const getAuthDepartmentsFn = (row) => {
  if (!row.authDepartments) {
    return '';
  }
  let authDepartmentsNameList = row.authDepartments.reduce((value, item) => {
    if (!item) {
      value.push('')
    } else {
      value.push(item.hrDepartmentName);
    }
    return value;
  }, []);
  let authDepartmentsName = authDepartmentsNameList ? authDepartmentsNameList.join(',') : ''
  return authDepartmentsName
}
